//
//  NSURLSessionTask+custom.h
//  KFD
//
//  Created by JIRENTIANXIANG on 6/6/15.
//  Copyright (c) 2015 KFD. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KFDResponseBody.h"

typedef void(^KFDSessionTaskCompletionHandler)(KFDResponseBody* response);

@interface NSURLSessionTask (custom)

+(NSURLSessionDataTask*)dataTaskWithSession:(NSURLSession*)session request:(NSURLRequest*)request completionHandler:(KFDSessionTaskCompletionHandler)completionHandler;

+(NSURLSessionUploadTask*)uploadTaskWithSession:(NSURLSession*)session request:(NSURLRequest*)request data:(NSData*)data completionHandler:(KFDSessionTaskCompletionHandler)completionHandler;

@end
